//创建一个router并暴露出去
import {createRouter, createWebHistory} from 'vue-router'
import Register from '../views/Register.vue'
import Login from '../views/Login.vue'
import Index from '../views/Index.vue'
import Student from '../views/other/Student.vue'

//一个 router 管理多个route
const router = createRouter({
    history: createWebHistory(),
    routes: [
        {
            path: '/',
            component: Student   // 默认路由
        },
        {
            path: '/register',
            component: Register
        },
        {
            path: '/login',
            component: Login
        },
        {
            path: '/index',
            component: Index
        }
    ]
})
//暴露出去
export default router